package jack.com.servicekeep;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyBootBroadcastReceiver extends BroadcastReceiver {
    private final String TAG = "yanjun";

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
            Log.d(TAG, "Android操作系统开机了，运行中.......");
        } else if (Intent.ACTION_SHUTDOWN.equals(action)) {
            Log.d(TAG, "Android操作系统关机了.......");
        }
    }
}
